package com.cw.demo.thread;

/**
 * TODO
 *
 * @author chenw
 * @date 2021/10/9
 */
public class ThreadGroupPriority {
    public static void main(String[] args) {
        ThreadGroup threadGroup = new ThreadGroup("t1");
        threadGroup.setMaxPriority(6);
        Thread thread = new Thread(threadGroup,"thread");
        thread.setPriority(5);
        System.out.println("我是线程组的优先级"+ threadGroup.getMaxPriority());
        System.out.println(thread.getThreadGroup().getName());
        System.out.println("我是线程的优先级"+ thread.getPriority());
    }
}
